shortcuts window: Make not subclassable
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 May 2019 19:03:49 +0000 (19:03 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 19 May 2019 19:03:49 +0000 (19:03 +0000)
Part of being more explicit about what
we allow to be subclassed and what not.

gtk/gtkshortcutsgroup.h
gtk/gtkshortcutssection.h
gtk/gtkshortcutsshortcut.h
gtk/gtkshortcutswindow.c
gtk/gtkshortcutswindow.h

index 492b9ffc782461fac731f3cf9d9bdb25ef7e0af4..5342634533f51209cbfbc0adcc3f855fcc9c829a 100644 (file)
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_SHORTCUTS_GROUP            (gtk_shortcuts_group_get_type ())
 #define GTK_SHORTCUTS_GROUP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUTS_GROUP, GtkShortcutsGroup))
-#define GTK_SHORTCUTS_GROUP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_GROUP, GtkShortcutsGroupClass))
 #define GTK_IS_SHORTCUTS_GROUP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUTS_GROUP))
-#define GTK_IS_SHORTCUTS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_GROUP))
-#define GTK_SHORTCUTS_GROUP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_GROUP, GtkShortcutsGroupClass))
 
 
 typedef struct _GtkShortcutsGroup         GtkShortcutsGroup;
index 420a0de6f3306a0079d4246aec3582ad64fc91f1..3f2012343581979b8973fbe2598d43ddbe3b8355 100644 (file)
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_SHORTCUTS_SECTION (gtk_shortcuts_section_get_type ())
 #define GTK_SHORTCUTS_SECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUTS_SECTION, GtkShortcutsSection))
-#define GTK_SHORTCUTS_SECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_SECTION, GtkShortcutsSectionClass))
 #define GTK_IS_SHORTCUTS_SECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUTS_SECTION))
-#define GTK_IS_SHORTCUTS_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_SECTION))
-#define GTK_SHORTCUTS_SECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_SECTION, GtkShortcutsSectionClass))
 
 
 typedef struct _GtkShortcutsSection      GtkShortcutsSection;
index dd9e7aaf375dd02fa241992b184550c08e9c0dc3..071a00caa43300a50c4b924e548bb337b00fc073 100644 (file)
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_SHORTCUTS_SHORTCUT (gtk_shortcuts_shortcut_get_type())
 #define GTK_SHORTCUTS_SHORTCUT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUTS_SHORTCUT, GtkShortcutsShortcut))
-#define GTK_SHORTCUTS_SHORTCUT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_SHORTCUT, GtkShortcutsShortcutClass))
 #define GTK_IS_SHORTCUTS_SHORTCUT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUTS_SHORTCUT))
-#define GTK_IS_SHORTCUTS_SHORTCUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_SHORTCUT))
-#define GTK_SHORTCUTS_SHORTCUT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_SHORTCUT, GtkShortcutsShortcutClass))
 
 
 typedef struct _GtkShortcutsShortcut      GtkShortcutsShortcut;
index db8f359a98c0729c2fe76267dc1607dd75d20275..bea8e84122ecb565021212e4c04c3a2dbfc14a96 100644 (file)
  * The .ui file for this example can be found [here](https://gitlab.gnome.org/GNOME/gtk/tree/master/demos/gtk-demo/shortcuts-builder.ui).
  */
 
+struct _GtkShortcutsWindowClass
+{
+  GtkWindowClass parent_class;
+
+  void (*close)  (GtkShortcutsWindow *self);
+  void (*search) (GtkShortcutsWindow *self);
+};
+
 typedef struct
 {
   GHashTable     *keywords;
index ec30006da19f77bd295e0cee10d47fb7239b8646..09249d122d91b0708f18412f7dec813b93815115 100644 (file)
@@ -29,10 +29,7 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_SHORTCUTS_WINDOW            (gtk_shortcuts_window_get_type ())
 #define GTK_SHORTCUTS_WINDOW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SHORTCUTS_WINDOW, GtkShortcutsWindow))
-#define GTK_SHORTCUTS_WINDOW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SHORTCUTS_WINDOW, GtkShortcutsWindowClass))
 #define GTK_IS_SHORTCUTS_WINDOW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SHORTCUTS_WINDOW))
-#define GTK_IS_SHORTCUTS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SHORTCUTS_WINDOW))
-#define GTK_SHORTCUTS_WINDOW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SHORTCUTS_WINDOW, GtkShortcutsWindowClass))
 
 
 typedef struct _GtkShortcutsWindow         GtkShortcutsWindow;
@@ -44,14 +41,6 @@ struct _GtkShortcutsWindow
   GtkWindow window;
 };
 
-struct _GtkShortcutsWindowClass
-{
-  GtkWindowClass parent_class;
-
-  void (*close)  (GtkShortcutsWindow *self);
-  void (*search) (GtkShortcutsWindow *self);
-};
-
 GDK_AVAILABLE_IN_ALL
 GType gtk_shortcuts_window_get_type (void) G_GNUC_CONST;